x86/p2m: {,un}map_mmio_regions() are HVM-only
authorJan Beulich <jbeulich@suse.com>
Mon, 3 May 2021 13:26:08 +0000 (15:26 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 3 May 2021 13:26:08 +0000 (15:26 +0200)
commita4d9fbc0d7b362d3a3d8790958178b2c9c6e2711
tree27ac15412ba2b29a8bbe3abc94ffb1e7ca71038a
parente7f062e246ad4a4d1baac86fec92fe9fa8aae4d8
x86/p2m: {,un}map_mmio_regions() are HVM-only

Mirror the "translated" check the functions do to do_domctl(), allowing
the calls to be DCEd by the compiler. Add ASSERT_UNREACHABLE() to the
original checks.

Also arrange for {set,clear}_mmio_p2m_entry() and
{set,clear}_identity_p2m_entry() to respectively live next to each
other, such that clear_mmio_p2m_entry() can also be covered by the
#ifdef already covering set_mmio_p2m_entry().

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
xen/arch/x86/mm/p2m.c
xen/common/domctl.c
xen/include/asm-x86/p2m.h